/*
 * =====================================================================================
 *
 *       Filename:  ChinaHotel.cc
 *
 *    Description:
 *
 *        Version:  1.0
 *        Created:  08/20/21 15:00:01
 *       Revision:  none
 *       Compiler:  gcc
 *
 *         Author:  XXXXXXX (), XXXX@jd.com
 *        Company:  JDAI
 *        Copyright:  Copyright 2021, XXXXXXX
 *
 * =====================================================================================
 */

#include "ChinaHotel.h"
#include "Log.h"

using std::string;

static const string TAG = "ChinaHotel";

ChinaHotel::ChinaHotel() {
    LogI("new");
    ISocketSPtr socket = std::make_shared < ChinaSocket > ();   //创建插排
    SetSocket(socket);  //
}

ChinaHotel::~ChinaHotel() {
    LogI("del");
}

bool ChinaHotel::Charging() {
    LogI("In");
    mspPowerAdapter->SetPowerMode(kPower220V);
    mspPowerAdapter->SetSocket(mspSocket);  //设置插排
    mspPowerAdapter->Charging12V();
    return true;
}
